package com.persondemo.videoappliction.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.persondemo.videoappliction.R;
import com.persondemo.videoappliction.bean.CollectionBean;
import com.persondemo.videoappliction.bean.SearchBean;
import com.persondemo.videoappliction.utils.ImageLoaderUtil;

import java.util.List;

/**
 * Created by Administrator on 2018/4/10.
 */

public class HistoryAdapter  extends BaseQuickAdapter<CollectionBean,BaseViewHolder> {
    private Context context;
    public HistoryAdapter(@Nullable List<CollectionBean> data, Context context) {
        super(R.layout.item_search, data);
        this.context = context;
    }
    @Override
    protected void convert(BaseViewHolder helper, CollectionBean item) {
        ImageLoaderUtil.LoadImage(context, item.getImg(), (ImageView) helper.getView(R.id.search_img));
        helper.setText(R.id.search_title,item.getTitle());
        helper.setText(R.id.search_time,item.getTime());
        helper.setText(R.id.search_desrc,"你已看过"+item.getLaji());
    }

}
